package com.sun;

public class StringReplaceAll {
    public static void main(String[] args) {
        System.out.println("the   quick   brown  fox jumps over the lazy dog"
                .replaceAll("\\s+"," "));

        System.out.println("the   quick   brown  fox jumps over the lazy dog"
                .replaceAll("(\\w+)","<b>$1</b>"));

        System.out.println("[abc".replace("[",""));
    }
}
